package com.ptp.backendcertms.basiccompnents.data.dao.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ptp.backendcertms.basiccompnents.data.dao.entity.ExceptionPo;
import com.ptp.backendcertms.basiccompnents.data.dao.mapper.IExceptionMapper;
import com.ptp.backendcertms.basiccompnents.data.dao.service.IExceptionService;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;

import static com.ptp.backendcertms.api.internal.constant.DateTypeConstant.DATE_TIME_PATTERN_SHORT_MATTER;

/**
 * 异常信息模型 服务实现
 *
 * @author songcongcong
 * @date 2025/5/3
 */
@Service
public class ExceptionServiceImpl extends ServiceImpl<IExceptionMapper, ExceptionPo> implements IExceptionService {
    @Override
    public void saveExceptionInfo(ExceptionPo entity) {
        entity.setCreateTime(LocalDateTime.now().format(DATE_TIME_PATTERN_SHORT_MATTER));
        save(entity);
    }
}
